@import "./toast";
header {
  height: 100px;
  background-color: #fff;
  .logo {
    h1 a {
      display: block;
      width: 130px;
      height: 100px;
      line-height: 100px;
      text-indent: -9999px;
      overflow: hidden;
      background: url('../../static/images/base/logo.png') no-repeat center;
      background-size: 100%;
    }
  }
  .dir {
    position: relative;
    margin-left: 30px;
    line-height: 100px;
    font-size: 16px;
    cursor: pointer;
    padding-right: 30px;
    >i {
      display: inline-block;
      @include setbgimg(18px, 12px, '../../static/images/base/dir.png');
    }
    .dir-menu {
      display: none;
      position: absolute;
      z-index: 500;
      cursor: default;
      left: -200px;
      width: 1122px;
      background-color: #fff;
      border: 1px solid #EEEEEE;
      border-radius: 0 0 5px 5px;
      font-size: 12px;
      line-height: 40px;
      &::before {
        content: '';
        position: absolute;
        width: 9px;
        height: 9px;
        background-color: #fff;
        border: 1px solid transparent;
        border-left-color: #EEEEEE;
        border-top-color: #EEEEEE;
        transform: rotateZ(45deg);
        top: -6px;
        left: 200px;
      }
      .dir-menu-item {
        padding: 24px 0;
        padding-left: 20px;
        border-right: 1px solid #EEEEEE;
        &:nth-child(1),
        &:nth-child(2) {
          width: 320px;
        }
        &:nth-child(3) {
          width: 480px;
        }
        .title {
          font-size: 14px;
          color: #000;
          a {
            float: right;
            color: #999999;
            font-size: 12px;
            margin-right: 15px;
            &::after {
              content: '\e630';
              font-family: 'iconfont';
              vertical-align: middle;
            }
          }
        }
        >ul li {
          float: left;
          line-height: 36px;
          margin-right: 30px;
          cursor: pointer;
          color: #666666;
          &:hover {
            color: $color;
          }
        }
      }
    }
    &:hover {
      .dir-menu {
        display: block;
      }
    }
  }
  .search_wrapper {
    position: relative;
    width: 552px;
    height: 48px;
    font-size: 0;
    margin-top: 26px;
    margin-left: 40px;
    border-radius: 5px;
    // overflow: hidden;
    input {
      width: 492px;
      height: 48px;
      background-color: #F7F7F7;
      font-size: 14px;
      vertical-align: top;
      padding-left: 15px;
    }
    >i {
      display: inline-block;
      cursor: pointer;
      @include setbgimg(58px, 48px, "../../static/images/base/search_btn.png");
    }
    .search-menu {
      display: none;
      position: absolute;
      width: 492px;
      top: 48px;
      left: 0;
      background-color: #fff;
      font-size: 12px;
      box-shadow: 0 0 3px rgba(0,0,0,.5);
      z-index: 400;
      border: 1px solid #E5E5E5;
      padding-bottom: 10px;
      .title-list {
        margin: 15px 15px 0 15px;
        border-bottom: 1px dashed #E5E5E5;
        padding-bottom: 5px;
        li {
          float: left;
          height: 36px;
          padding: 0 15px;
          line-height: 34px;
          border-radius: 3px;
          margin-bottom: 10px;
          margin-right: 15px;
          background-color: #F7F7F7;
          border: 1px solid #E5E5E5;
          cursor: pointer;
          color: #999999;
          i {
            float: left;
            margin-top: 8px;
            border-radius: 50%;
            width: 18px;
            height: 18px;
            margin-right: 5px;
          }
        }
        li.valid {
          background-color: #FFEBEF !important;
          border: 1px solid #FFDAE1;
          color: #FF4466;
          &:hover {
            background-color: #FFDAE1 !important;
          }
          i {
            background-color: #FF4466 !important;
          }
        }
      }
      .content-list {
        margin-top: 10px;
        li {
          line-height: 30px;
          height: 30px;
          color: #000;
          a {
            display: block;
            width: 100%;
            padding: 0 15px;
            &:hover {
              background-color: #F7F7F7;
            }
          }
        }
      }
    }
  }
  .opearation {
    margin-top: 30px;
    margin-left: 10px;
    >li:last-child {
      position: relative;
      &:hover {
        .download-app {
          display: block;
        }
      }
    }
    >li {
      float: left;
      cursor: pointer;
      height: 48px;
      margin: 0 10px;
      .icon {
        margin-bottom: 3px;
      }
      .message {
        @include setbgimg(100%, 24px, '../../static/images/base/message.png');
      }
      .store {
        @include setbgimg(100%, 24px, '../../static/images/base/store.png');
      }
      .shopcart {
        @include setbgimg(100%, 24px, '../../static/images/base/shopcart.png');
      }
      .app {
        @include setbgimg(100%, 24px, '../../static/images/base/code.png');
      }
      .download-app {
        display: none;
        position: absolute;
        z-index: 500;
        left: 50%;
        transform: translateX(-50%);
        width: 181px;
        height: 200px;
        img {
          width: 100%;
          height: 100%;
        }
      }
    }
  }
  .user-info {
    display: none;
    position: relative;
    line-height: 24px;
    margin-top: 38px;
    .avatar {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      overflow: hidden;
      margin-right: 6px;
      img {
        width: 100%;
        height: 100%;
      }
    }
    .nickname {
      font-size: 14px;
      cursor: pointer;
      padding-bottom: 10px;
      i {
        font-size: 10px;
        vertical-align: middle;
      }
      &:hover {
        span.title {
          color: $color;
        }
        .user-operation {
          display: block;
        }
      }
      .user-operation {
        display: none;
        position: absolute;
        z-index: 500;
        top: 30px;
        left: 50%;
        transform: translateX(-50%);
        background-color: #fff;
        box-shadow: 0 0 3px rgba(0,0,0,.5);
        border-radius: 2px;
        line-height: 50px;
        text-align: center;
        padding: 0 30px;
        li {
          white-space: nowrap;
          &:hover {
            color: $color;
          }
        }
      }
    }
  }
  .login-tip {
    display: none;
    width: 130px;
    line-height: 24px;
    text-align: center;
    margin-top: 28px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    a {
      display: block;
      width: 100%;
      height: 100%;
      &:hover {
        color: $color;
      }
    }
  }
}

header#sticky-header {
  position: fixed;
  top: -70px;
  width: 100%;
  height: 70px;
  transition: top 1s;
  z-index: 9999;
  .search_wrapper {
    margin: 11px 50px 0 100px;
  }
  .logo {
    margin-top: 10px;
    h1 a {
      width: 65px;
      height: 50px;
    }
  }
  .user-info {
    margin-top: 23px;
  }
  .opearation {
    margin-top: 14px;
  }
}